#ifndef RESAMPLE_H
#define RESAMPLE_H
extern "C"{
#include <libswresample/swresample.h>
#include <libavcodec/avcodec.h>
}

class Resample
{
public:
    Resample();

    bool initSwrCtx(AVCodecParameters *params);
    int transDataFmtRetSize(AVFrame *indata, unsigned char *data);

private:
    SwrContext* swrCtx = nullptr;
    //AV_SAMPLE_FMT_S16
    // int  = 1;
    AVSampleFormat outFormat = AV_SAMPLE_FMT_S16;

};

#endif // RESAMPLE_H
